package cn.k7g.codeflow.api;

import cn.k7g.codeflow.common.AjaxResult;
import cn.k7g.codeflow.service.CodeNodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("node")
public class NodeController {

    @Autowired
    private CodeNodeService codeNodeService;

    @GetMapping
    public AjaxResult listNodes() {
        return AjaxResult.success(codeNodeService.listCodeNode());
    }
}
